﻿using System;
using System.Collections.Generic;
using System.Web;

namespace AUV5.Web
{
    public class PageBaseBackend : PageBaseTop
    {
        protected void Page_PreInit(object sender, EventArgs e)
        {
            try
            {
                if (base.IsVerified)
                {
                    if (BLL.RoleInfoBLL.Instance.GetDetail(base.VerifiedInfo.User.RoleID).RoleName != MANAGER)
                    {
                        Response.Redirect(URL_INDEX, true);
                    }
                }
                else
                {
                    Response.Redirect(URL_LOGIN, true);
                }

                //this.Theme = "Default";
            }
            catch (Exception)
            {
                throw;
            }
        }

        protected override void OnPreInit(EventArgs e)
        {
            //base.OnPreInit 触发 Page_PreInit
            base.OnPreInit(e);
            //this.Theme = "Default";
        }

        protected void Page_PreLoad(object sender, EventArgs e)
        {

        }

        protected override void OnPreLoad(EventArgs e)
        {
            //base.OnPreLoad 触发 Page_PreLoad
            base.OnPreLoad(e);
        }
    }
}